import request from '@/utils/useRequest'
import axios from "axios";
export const httpUpload = (file) => {
    let formData = new FormData()
    formData.append('file', file)
    return request({
        url: '/norms/upload/singleUploadFile',
        method: 'post',
        data: formData
    })
}
export const getCityTree = () => {
    return request({
        url: '/norms/sys/sysArea/tree',
        method: 'post'
    })
}
export const http = {
    login: (data) => {
        return request({
            url: '/norms/sys/login',
            data,
            method: 'post'
        })
    },
    logout: (data) => {
        return request({
            url: '/norms/sys/logout',
            data,
            method: 'post'
        })
    },
    user: {
        page: (data) => {
            return request({
                url: '/norms/admin/businessUser/pageList',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/businessUser/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/businessUser/insertAndUpdate',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/businessUser/insertAndUpdate',
                data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/businessUser/enableDisable',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/businessUser/deleteById',
                data,
                method: 'post'
            })
        }

    },
    industryCategory: {
        page: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/industryCateGory/deleteById',
                data,
                method: 'post'
            })
        }
    },
    industryInfo: {
        page: (data) => {
            return request({
                url: '/norms/admin/productChainGraph/pageList',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/productChainGraph/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/productChainGraph/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/productChainGraph/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/productChainGraph/deleteById',
                data,
                method: 'post'
            })
        }

    },
    enterpriseRes: {
        page: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/pageList',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/update',
                data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/asterisk',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/enterpriseInfo/deleteById',
                data,
                method: 'post'
            })
        },
        // 导入
        import: (file) => {
            let formData = new FormData()
            formData.append('file', file)
            return request({
                url: '/norms/admin/enterpriseInfo/importExcel',
                data: formData,
                method: 'post'
            })
        }
    },
    policyCategory: {
        page: (data) => {
            return request({
                url: '/norms/admin/policyCategory/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/policyCategory/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/policyCategory/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/policyCategory/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/policyCategory/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/policyCategory/deleteById',
                data,
                method: 'post'
            })
        }

    },
    policyInfo: {
        page: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/industryPolicy/deleteById',
                data,
                method: 'post'
            })
        }

    },
    sentiment: {
        page: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/deleteById',
                data,
                method: 'post'
            })
        },
        import: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/importExcel',
                data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/industrySentiment/sort',
                data: data,
                method: 'post'
            })
        },
    },
    productCategory: {
        page: (data) => {
            return request({
                url: '/norms/admin/productCategory/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/productCategory/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/productCategory/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/productCategory/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/productCategory/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/productCategory/deleteById',
                data,
                method: 'post'
            })
        }

    },
    productInfo: {
        page: (data) => {
            return request({
                url: '/norms/admin/product/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/product/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/product/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/product/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/product/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/product/deleteById',
                data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/product/unmount',
                data,
                method: 'post'
            })
        },

    },
    materialInfo: {
        page: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/update',
                data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/recommend',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/rawMaterial/deleteById',
                data,
                method: 'post'
            })
        }

    },
    banner: {
        page: (data) => {
            return request({
                url: '/norms/admin/banner/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/banner/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/banner/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/banner/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/banner/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/banner/deleteById',
                data,
                method: 'post'
            })
        }

    },
    DigitizationCategory: {
        page: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/applicationCategory/deleteById',
                data,
                method: 'post'
            })
        }

    },
    DigitizationApp: {
        page: (data) => {
            return request({
                url: '/norms/admin/application/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/application/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/application/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/application/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/application/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/application/deleteById',
                data,
                method: 'post'
            })
        }

    },
    Account: {
        page: (data) => {
            return request({
                url: '/norms/sysUser/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/sysUser/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/sysUser/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/sysUser/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/sysUser/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/sysUser/delete',
                data,
                method: 'post'
            })
        },

        updateStatus: (data) => {
            return request({
                url: '/norms/sysUser/unmount',
                data: data,
                method: 'post'
            })
        },

    },
    Role: {
        page: (data) => {
            return request({
                url: '/norms/sysRole/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/sysRole/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/sysRole/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/sysRole/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/sysRole/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/sysRole/deleteById',
                data,
                method: 'post'
            })
        },

    },
    ProfessionDynamic: {
        page: (data) => {
            return request({
                url: '/norms/admin/industryInfo/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/industryInfo/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/industryInfo/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/industryInfo/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/industryInfo/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/industryInfo/deleteById',
                data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/industryInfo/sort',
                data: data,
                method: 'post'
            })
        },
        updateTop:  (data) => {
            return request({
                url: '/norms/admin/industryInfo/asterisk',
                data: data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/industryInfo/unmount',
                data: data,
                method: 'post'
            })
        },

    },
    Meeting: {
        page: (data) => {
            return request({
                url: '/norms/admin/exhibition/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/exhibition/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/exhibition/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/exhibition/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/exhibition/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/exhibition/deleteById',
                data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/exhibition/sort',
                data: data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/exhibition/unmount',
                data: data,
                method: 'post'
            })
        },

        updateTop:  (data) => {
            return request({
                url: '/norms/admin/exhibition/asterisk',
                data: data,
                method: 'post'
            })
        },

    },
    EnterpriseConsult: {
        page: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/deleteById',
                data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/unmount',
                data: data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/sort',
                data: data,
                method: 'post'
            })
        },

        updateTop:  (data) => {
            return request({
                url: '/norms/admin/enterpriseConsult/asterisk',
                data: data,
                method: 'post'
            })
        },

    },
    Tender: {
        page: (data) => {
            return request({
                url: '/norms/admin/bid/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/bid/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/bid/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/bid/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/bid/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/bid/deleteById',
                data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/bid/sort',
                data: data,
                method: 'post'
            })
        },


        updateTop:  (data) => {
            return request({
                url: '/norms/admin/bid/asterisk',
                data: data,
                method: 'post'
            })
        },

    },
    UserDynamic: {
        page: (data) => {
            return request({
                url: '/norms/admin/communityTrends/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/communityTrends/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/communityTrends/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/communityTrends/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/communityTrends/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/communityTrends/deleteById',
                data,
                method: 'post'
            })
        },
        updateIndex: (data) => {
            return request({
                url: '/norms/admin/communityTrends/sort',
                data: data,
                method: 'post'
            })
        },
        updateStatus: (data) => {
            return request({
                url: '/norms/admin/communityTrends/unmount',
                data: data,
                method: 'post'
            })
        },
    },
    Server: {
        page: (data) => {
            return request({
                url: '/norms/admin/customerService/pageList',
                data,
                method: 'post'
            })
        },
        list: (data) => {
            return request({
                url: '/norms/admin/customerService/list',
                data,
                method: 'post'
            })
        },
        read: (data) => {
            return request({
                url: '/norms/admin/customerService/detail',
                data,
                method: 'post'
            })
        },
        create: (data) => {
            return request({
                url: '/norms/admin/customerService/insert',
                data,
                method: 'post'
            })
        },
        update: (data) => {
            return request({
                url: '/norms/admin/customerService/update',
                data,
                method: 'post'
            })
        },
        del: (data) => {
            return request({
                url: '/norms/admin/customerService/deleteById',
                data,
                method: 'post'
            })
        },
    },
}